package com.abao.spring5;

import org.springframework.beans.factory.FactoryBean;

/**
 * @author abao
 * @date 2021-01-14 22:42
 */
public class MyBean implements FactoryBean<User> {

    //定义返回bean
    @Override
    public User getObject() throws Exception {
        User user = new User();
        return user;
    }

    @Override
    public Class<?> getObjectType() {
        return User.class;
    }

    //是否单例实例
    @Override
    public boolean isSingleton() {
        return false;
    }
}
